# 基础镜像
FROM openjdk:8

LABEL maintainer="Hong Yun"

RUN mkdir -p /hongyun/server/logs \
    /hongyun/server/temp \
    /hongyun/skywalking/agent

WORKDIR /hongyun/server

ENV SERVER_PORT=10002 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""

EXPOSE ${SERVER_PORT}

ADD ./target/Crmeb-admin.jar ./app.jar

ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
           # 应用名称 如果想区分集群节点监控 改成不同的名称即可
           #-Dskywalking.agent.service_name=ruoyi-server \
           #-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \
           -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC ${JAVA_OPTS} \
           -jar app.jar